package com.parfinex.java.phase1.module2.task08;

public class Animal {
    private String name;
    private String color;

    public Animal() {
    }

    public Animal(String name, String color) {
        setName(name);//this.name = name;
        setColor(color);//this.color = color;
    }
//
//    Animal(){}
//
//    Animal(String name, String color){
//        getName(name);
//        getColor(color);
//    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public void show(){
        System.out.println("名字："+getName()+"，颜色："+getColor());
    }
}
